using Microsoft.AspNetCore.Mvc.Filters;
using SecondDemo.API.Extensions;

namespace SecondDemo.API.Filters;

public class CustomAuthorizationFilterAttribute : Attribute, IAuthorizationFilter
{
    public void OnAuthorization(AuthorizationFilterContext context)
    {
        // 可在此处查看context 
        // context.HttpContext.Request 即为前端传过来的参数
        // throw new NotImplementedException();
        var queryString = context.HttpContext.Request.QueryString;
        var dicParams = queryString.Value.GetParameter();
    }
}
